const array = ["abc", "cba", "nba", "cba", "nba"]
let newArray = array.filter((item, index) => {
    return array.indexOf(item) === index

    /*
    0==0    2
    1==1    3
    2==2    4
    3==3    1
    */
})

console.log(newArray)  
/*
[
  2, 3, 4, 1,
  5, 6, 8, 9
]
*/

